package com.ruoyi.human.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.human.mapper.ClinicalTrialEmergencyPlanMapper;
import com.ruoyi.human.domain.ClinicalTrialEmergencyPlan;
import com.ruoyi.human.service.IClinicalTrialEmergencyPlanService;

/**
 * 临床试验应急预案Service业务层处理
 * 
 * @author gw
 * @date 2025-01-06
 */
@Service
public class ClinicalTrialEmergencyPlanServiceImpl implements IClinicalTrialEmergencyPlanService 
{
    @Autowired
    private ClinicalTrialEmergencyPlanMapper clinicalTrialEmergencyPlanMapper;

    /**
     * 查询临床试验应急预案
     * 
     * @param planId 临床试验应急预案主键
     * @return 临床试验应急预案
     */
    @Override
    public ClinicalTrialEmergencyPlan selectClinicalTrialEmergencyPlanByPlanId(Long planId)
    {
        return clinicalTrialEmergencyPlanMapper.selectClinicalTrialEmergencyPlanByPlanId(planId);
    }

    /**
     * 查询临床试验应急预案列表
     * 
     * @param clinicalTrialEmergencyPlan 临床试验应急预案
     * @return 临床试验应急预案
     */
    @Override
    public List<ClinicalTrialEmergencyPlan> selectClinicalTrialEmergencyPlanList(ClinicalTrialEmergencyPlan clinicalTrialEmergencyPlan)
    {
        return clinicalTrialEmergencyPlanMapper.selectClinicalTrialEmergencyPlanList(clinicalTrialEmergencyPlan);
    }

    /**
     * 新增临床试验应急预案
     * 
     * @param clinicalTrialEmergencyPlan 临床试验应急预案
     * @return 结果
     */
    @Override
    public int insertClinicalTrialEmergencyPlan(ClinicalTrialEmergencyPlan clinicalTrialEmergencyPlan)
    {
        return clinicalTrialEmergencyPlanMapper.insertClinicalTrialEmergencyPlan(clinicalTrialEmergencyPlan);
    }

    /**
     * 修改临床试验应急预案
     * 
     * @param clinicalTrialEmergencyPlan 临床试验应急预案
     * @return 结果
     */
    @Override
    public int updateClinicalTrialEmergencyPlan(ClinicalTrialEmergencyPlan clinicalTrialEmergencyPlan)
    {
        return clinicalTrialEmergencyPlanMapper.updateClinicalTrialEmergencyPlan(clinicalTrialEmergencyPlan);
    }

    /**
     * 批量删除临床试验应急预案
     * 
     * @param planIds 需要删除的临床试验应急预案主键
     * @return 结果
     */
    @Override
    public int deleteClinicalTrialEmergencyPlanByPlanIds(Long[] planIds)
    {
        return clinicalTrialEmergencyPlanMapper.deleteClinicalTrialEmergencyPlanByPlanIds(planIds);
    }

    /**
     * 删除临床试验应急预案信息
     * 
     * @param planId 临床试验应急预案主键
     * @return 结果
     */
    @Override
    public int deleteClinicalTrialEmergencyPlanByPlanId(Long planId)
    {
        return clinicalTrialEmergencyPlanMapper.deleteClinicalTrialEmergencyPlanByPlanId(planId);
    }
}
